<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    /*

     */
    let map = new Map();
    map.set("name", "lishuaihao");
    map.set("age", 25);
    map.set("gender", "男");
    console.log(map);
    let res = Array.from(map); // map 转数组
    console.log(res, "res");
    let map2 = new Map([
      [1, 2],
      ["a", "fsd"],
      ["fsd2", "09053"],
    ]);
    console.log(map2, "map2");
    let obj = { name: "zs", age: 23, gender: "女" };
    let res1 = map.entries(); // 对象转数组
    let [a, b] = res1.next().value;

    console.log(res1.next().value, "value");
  </script>
</html>
